﻿using Nancy;
using Nancy.Bootstrapper;
using Nancy.Conventions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SAP.BusinessOne.Cockpit
{
    public class Startup
    {
        public static INancyBootstrapper Configure()
        {
            return new CockpitBootstrapper();
        }
    }

    public class CockpitBootstrapper : DefaultNancyBootstrapper
    {
        protected override void ConfigureConventions(NancyConventions conventions)
        {
            base.ConfigureConventions(conventions);

            //conventions.StaticContentsConventions.Add(
            //   StaticContentConventionBuilder.AddFile("/index.html", "sap/sbo/cockpit/index.html")
            //);
            conventions.StaticContentsConventions.Add(
               StaticContentConventionBuilder.AddDirectory("sap", "sap")
            );
        }
    }


}